package FuncView

import "github.com/astaxie/beego"

func Add(page int) int {
	return page + 1
}

func Reduce(page int) int {
	return page - 1
}

func IfReduce(page int) bool {
	if page == 1 {
		return false
	}

	return true
}

func IfNext(page int, count int) bool {
	if page == count {
		return false
	}

	return true
}

func StrIf(p string, q string) bool {
	if q == p {
		return true
	}

	return false
}

func init() {
	beego.AddFuncMap("Add", Add)
	beego.AddFuncMap("Red", Reduce)
	beego.AddFuncMap("iFRed", IfReduce)
	beego.AddFuncMap("iFend", IfNext)
	beego.AddFuncMap("seq", StrIf)

}
